//
//  RankTableViewCell.m
//  XingRun
//
//  Created by 赵颜彬 on 17/1/11.
//  Copyright © 2017年 赵颜彬. All rights reserved.
//

#import "RankTableViewCell.h"

@implementation RankTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.number = [[UILabel alloc] init];
        self.number.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self.contentView addSubview:_number];
        
        self.img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"占位图"]];
        [self.contentView addSubview:_img];
        
        self.line = [[UIImageView alloc] init];
        [self.contentView addSubview:_line];
        
        self.name = [[UILabel alloc] init];
        _name.text = @"用户名";
        self.name.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self.contentView addSubview:_name];
        
        self.km = [[UILabel alloc] init];
        self.km.text = @"24.4km";
        self.km.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self.contentView addSubview:_km];
        
        self.quan = [[UIImageView alloc] init];
        [self.contentView addSubview:_quan];
        
        
      
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.number.frame = CGRectMake(10 * WIDTH, 10 * HEIGHT, 20 * WIDTH, 20 * HEIGHT);
    
    self.img.frame = CGRectMake(30 * WIDTH, 10 * HEIGHT, 40 * WIDTH, 30 * HEIGHT);
    
    self.name.frame = CGRectMake(70 * WIDTH, 10 * HEIGHT, 40 * WIDTH, 20 * HEIGHT);
    
    self.line.frame = CGRectMake(70 * WIDTH, 30 * HEIGHT, 230 * WIDTH, 10 * HEIGHT);
    
    self.km.frame = CGRectMake(250 * WIDTH, 10 * HEIGHT, 50 * WIDTH, 20 * HEIGHT);
    
    self.quan.frame =CGRectMake(320 * WIDTH, 10 * HEIGHT, 40 * WIDTH, 40 * HEIGHT);
}

@end
